﻿<%@ Page Language="VB" AutoEventWireup="false" Theme="myTheme" MasterPageFile="~/masterPage.master"
    CodeFile="Default.aspx.vb" Inherits="_Default" %>
    <%@ Register Src="~/UserCuntrols/footer.ascx" TagName="footer" TagPrefix="uc1" %>
<%@ Register Src="~/UserCuntrols/TopMenu.ascx" TagName="TopMenu" TagPrefix="uc1" %>
<%@ Register Src="~/UserCuntrols/AddRatator.ascx" TagName="AddRatator" TagPrefix="uc1" %>
<%@ Register Src="~/UserCuntrols/CustomDropDown.ascx" TagName="CustomDropDown" TagPrefix="uc1" %>
<asp:Content ContentPlaceHolderID="_head" runat="server" ID="head">
<script language="javascript" type="text/javascript">
    searchKeyPress = function(e){
        if(!e) var e = window.event;

        if(e.keyCode == 13){
            $('<%=btnSearch.ClientID %>').click();
            return false;
        }
    };
</script>
</asp:Content>
<asp:Content ContentPlaceHolderID="_main" runat="server">
    <asp:UpdatePanel ID="UpdatePanelFrame" runat="server" RenderMode="Inline">
        <ContentTemplate>
            <asp:Image ID="imgFrame" runat="server" style="position:absolute;" BorderWidth="0" ImageUrl="~/images/background.gif" Height="90%" Width="99.8%" ImageAlign="AbsMiddle"/>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"></asp:AsyncPostBackTrigger>
        </Triggers>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgressYahoo" runat="server" AssociatedUpdatePanelID="UpdatePanelYahoo">
        <ProgressTemplate>
            <div id="loader" class="loader" align="center">
                <img src="<%=ResolveUrl("~/images/loading-spinner.gif") %>" alt="Loading..." /><span
                    id="loaderText" class="loaderText">Loading...</span>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdateProgress ID="UpdateProgresssubmit" runat="server" AssociatedUpdatePanelID="UpdatePanelsubmit">
        <ProgressTemplate>
            <div id="loader" class="loader" align="center">
                <img src="<%=ResolveUrl("~/images/loading-spinner.gif") %>" alt="Loading..." /><span
                    id="loaderText" class="loaderText">Loading...</span>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <div style="width: 100%; position: absolute;" align="center">
        <asp:UpdatePanel ID="UpdatePanelSpacer" runat="server" RenderMode="Inline">
            <ContentTemplate>
                <asp:Image ID="imgBlank" runat="server" ImageUrl="~/images/spacer.gif" Width="1"
                    Height="180" />
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"></asp:AsyncPostBackTrigger>
            </Triggers>
        </asp:UpdatePanel>
        <asp:Panel ID="Panel1" runat="server" Style="margin-top: 0px">
        </asp:Panel>
         <asp:Panel ID="search" style="width:100%;" runat="server" CssClass="aspPanel" HorizontalAlign="Center">
            <uc1:TopMenu ID="topMenu1" runat="server" SelectedTab="Video" />
            <div id="divSearch" align="center">
                <asp:Label Text="" ID="lblSearch" runat="server"></asp:Label>
                <asp:TextBox runat="server" ID="txtKeyword" CssClass="aspTextBox"
                    Text="" ToolTip="Place your keyword to search"></asp:TextBox>
                 <script language="javascript" type="text/javascript">
                $('<%=txtKeyword.ClientID %>').onkeypress = searchKeyPress;
                </script>
                <asp:UpdatePanel ID="UpdatePanelsubmit" runat="server" RenderMode="Inline">
                    <ContentTemplate>
                        <asp:ImageButton ImageUrl="~/images/GigitiButton4.gif" runat="server" ToolTip="Click to search specified keyword" style="margin-top:-5px;" Width="63" Height="33" AlternateText="Search" ID="btnSearch" ImageAlign="AbsMiddle" />
                        <div style="margin-top:-10px;">
                        <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="Please enter keyword"></asp:CustomValidator>
                        </div>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"></asp:AsyncPostBackTrigger>
                    </Triggers>
                </asp:UpdatePanel>
               <div style="float: left; margin-top: -3px; width: 100%;">
                   <center>
                        <asp:Image ID="logoPoweredby" runat="server" ImageUrl="~/images/yahoo.gif" Height="20"
                            AlternateText="Powered by" ToolTip="Powered by" />
                    </center>
                </div>
            </div>
            <div style="float: left;width:100%;margin-left:-50px;" align="center">
            </div>
        </asp:Panel>
    </div>
    <!-- End Search Panel -->
    <!-- Begin Google  Video Result Panel -->
    <div style="width: 100%; position: absolute; top: 250px" align="center">
        <asp:UpdatePanel ID="UpdatePanelYahoo" runat="server" RenderMode="Inline">
            <ContentTemplate>
                <asp:Panel ID="googleVideoResult" runat="server" Visible="false" __designer:wfdid="w20">
                    <asp:DataList ID="yahooVideoRes" runat="server" RepeatColumns="5" RepeatDirection="Horizontal"
                        Width="100%" CellSpacing="10">
                        <HeaderStyle CssClass="datagridHeader" />
                        <ItemTemplate>
                            <div align="center">
                                <a target="_blank" href='<%#Eval ("Url")%>' title='<%#Eval("Video") %>'>
                                    <img style="max-width: 140px; max-height: 100px; border: 0px;" src='<%#Eval("Video")%>' /></a>
                            </div>
                            <div align="center">
                                <a href='<%#Eval("Url")%>' target="_blank" title='<%#Eval("title")%>'>
                                    <%#Eval("Text")%></a>
                            </div>
                        </ItemTemplate>
                    </asp:DataList>
                    <br />
                    <br />
                    <div align="center">
                        <asp:LinkButton ID="lnkYahooPrev" runat="server" Style="color: #A0A0A0; font-weight: bold;
                            text-decoration: none;">&lt; Prev</asp:LinkButton>
                        <asp:LinkButton ID="lnkYahooNext" runat="server" Style="color: #A0A0A0; font-weight: bold;
                            text-decoration: none;">Next &gt;</asp:LinkButton>
                        <span style="padding-left: 20px;">
                            <asp:Literal ID="litYahooSearchCount" runat="server"></asp:Literal></span>
                    </div>
                </asp:Panel>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"></asp:AsyncPostBackTrigger>
                <asp:AsyncPostBackTrigger ControlID="lnkYahooNext" EventName="Click"></asp:AsyncPostBackTrigger>
                <asp:AsyncPostBackTrigger ControlID="lnkYahooPrev" EventName="Click"></asp:AsyncPostBackTrigger>
            </Triggers>
        </asp:UpdatePanel>
        <asp:UpdatePanel ID="UpdatePanelHyperlinkBottom" runat="server" RenderMode="Inline">
            <ContentTemplate>
                <BR />
                <asp:Panel ID="pnlHyperlinkBottom" runat="server" Visible="false" HorizontalAlign="Center">
                    <uc1:AddRatator ID="ads" runat=server XMLFile="~/XML/Advertisements1.xml" />
                    <BR />
                   </asp:Panel> 
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"></asp:AsyncPostBackTrigger>
                <asp:AsyncPostBackTrigger ControlID="lnkYahooNext" EventName="Click"></asp:AsyncPostBackTrigger>
                <asp:AsyncPostBackTrigger ControlID="lnkYahooPrev" EventName="Click"></asp:AsyncPostBackTrigger>
            </Triggers>
        </asp:UpdatePanel>
    </div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline">
        <ContentTemplate>
            <asp:Panel ID="pnlImage1" runat="server" align="center" Style="position: absolute;
                bottom: 10px;" Width="100%">
               <uc1:footer ID="footer1" runat="server" />
            </asp:Panel>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"></asp:AsyncPostBackTrigger>
        </Triggers>
    </asp:UpdatePanel>
    <!-- End Google Video Result Panel -->
    <script language="javascript">
    document.getElementById("<%=txtKeyword.ClientId %>").focus();
    </script>
</asp:Content>
